package Launcher;

import java.io.BufferedWriter;
import java.io.FileWriter;

public class Generator {
	private long[] list;
	public static void main( String[] args ) {
		// the number in the generator is how many numbers will be generated
		@SuppressWarnings("unused")
		Generator gen = new Generator( 100000 );
	}
	public Generator( int numbers ) {
		list = new long[numbers];
		int counter = 0;
		for(int i = 0; i < numbers; i++){
//			Random rand = new Random();
//			int randomInt = rand.nextInt(100000);
			list[i] = counter;
			counter ++;
		}
//		writeToFile( ""+numbers );
		writeToFile( "BC100000" );
	}
	public void writeToFile( String numbers ) {
		try{
			FileWriter fsStream = new FileWriter( numbers + ".txt" );
			BufferedWriter outB = new BufferedWriter( fsStream );
			
			for(int i=0; i < 100000; i++){
				System.out.println( "writing now: " + list[i] );
				outB.write( "" + list[i] );
				outB.newLine();
			}
			outB.close();
		}catch( Exception e ){
			e.printStackTrace();
			System.err.println( "Error: " + e.getMessage() );
		}
	}
}
